import { defineComponent } from 'vue';
interface InputProps {
  value: string;
  onChange: (value: string) => void;
  onHandleChange: (value: string) => void;
}
const Input = defineComponent <InputProps>({
  name: 'YxInput',
  setup(props, { emit }) {
    const handleChange = (event: Event) => {
      emit('handleChange', (event.target as HTMLInputElement).value)
    }
    return () => (
      //tsx中不能用 v-model
      <input value={props.value} onInput={handleChange} />
    )
  }
})
export default Input;